class CatGroupEntity {
	int code;
	List<CatGroupData> data;

	CatGroupEntity({this.code, this.data});

	CatGroupEntity.fromJson(Map<String, dynamic> json) {
		code = json['code'];
		if (json['data'] != null) {
			data = new List<CatGroupData>();(json['data'] as List).forEach((v) { data.add(new CatGroupData.fromJson(v)); });
		}
	}

	Map<String, dynamic> toJson() {
		final Map<String, dynamic> data = new Map<String, dynamic>();
		data['code'] = this.code;
		if (this.data != null) {
      data['data'] =  this.data.map((v) => v.toJson()).toList();
    }
		return data;
	}
}

class CatGroupData {
	String name;
	String checkImg;
	String bgImg;
	int id;

	CatGroupData({this.name, this.checkImg, this.bgImg, this.id});

	CatGroupData.fromJson(Map<String, dynamic> json) {
		name = json['name'];
		checkImg = json['check_img'];
		bgImg = json['bg_img'];
		id = json['id'];
	}

	Map<String, dynamic> toJson() {
		final Map<String, dynamic> data = new Map<String, dynamic>();
		data['name'] = this.name;
		data['check_img'] = this.checkImg;
		data['bg_img'] = this.bgImg;
		data['id'] = this.id;
		return data;
	}
}
